﻿#include "snake.h"


void test()
{
	srand((unsigned int)time(NULL));
	int ch = 0;
	do {
		
		system("cls");
		pSnake ps = malloc(sizeof(Snake));
		pSnake_Inits(ps);
		GameStart(ps);
		GameRun(ps);
		GameEnd(ps);
		SetsPos(24, 10);

		printf("是否在来一把,输出Y重新开始:");
		ch = getchar();
		while (getchar() != '\n');

	} while (ch == 'y' || ch == 'Y');
	SetsPos(0, 27);

}
int main()
{
	//wprintf(L"欢迎来贪吃蛇小游戏\n");

	test();

	return 0;
}
